package com.scalar.chiptrack.operations.dataentry.lotTransfer.actioncommands;

import com.scalar.chiptrack.actioncommands.ActionCommand;
import com.scalar.chiptrack.commons.Constants;


public class TransferMaterialActionCommandFactory implements Constants
{
    private TransferMaterialActionCommandFactory()
    {
    }

    public static ActionCommand getActionCommand( String action )
    {
        //System.out.println("ScrapMaterialActionCommandFactory.getActionCommand = " + action);

        if ( action == null || "processTypes".equalsIgnoreCase( action )  )
        {
            return new TransferMaterialLoadProcessTypesCommand();
        }
        else if ( "search".equalsIgnoreCase( action ) )
        {
            return new TransferMaterialSearchDetailsCommand();
        }
        else if ( "lotDetails".equalsIgnoreCase( action ) )
        {
            return new TransferMaterialLoadLotDetailsCommand();
        }
        else if ( "save".equalsIgnoreCase( action ) || "confirm".equalsIgnoreCase( action )
                || "saveDepartment".equalsIgnoreCase( action ) || "addNewDepartment".equalsIgnoreCase(action) )
        {
            return new TransferMaterialSaveLotDetailsCommand();
        }
        else if ( "transferMaterialReport".equalsIgnoreCase( action ) || "transferMaterialReportExcel".equalsIgnoreCase( action ) )
        {
            return new TransferMaterialReportCommand();
        }
       return null;
    }
}
